﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cabal.Kernel.Provider
{
    public class ResourceException : Exception
    {
        public ResourceException(string message)
            : base(message) { }
        public ResourceException(string message, Exception innerException)
            : base(message, innerException) { }

        public static ResourceException BS_VerifyEmpty = new ResourceException("验证码BS用尽");
        public static ResourceException BS_NomalEmpty = new ResourceException("普通BS用尽");
        public static ResourceException BS_AllEmpty = new ResourceException("所有BS都已用尽");

        public static ResourceException User_OldEmpty = new ResourceException("老马甲用尽");
        public static ResourceException User_NewEmpty = new ResourceException("新马甲用尽");
        public static ResourceException User_AllEmpty = new ResourceException("所有马甲都已用尽");

        public static ResourceException Request_ArgUnknow = new ResourceException("未知的请求参数");
        public static ResourceException Request_UnknowData = new ResourceException("未知的请求数据");
        public static ResourceException Request_UnknowType(IProvider provider,string type)
        {
            return new ResourceException(provider.ToString() + "不支持\"" + type + "\"类型");
        }
    }
}
